<div class="row-fluid">	
<div class="box span12">
    <div class="box-header">
        <h2><i class="icon-align-justify"></i><span class="break"></span>借款资料编辑</h2>
        <div class="box-icon">
            <a href="#" class="btn-minimize"><i class="icon-chevron-up"></i></a>
            <a href="#" class="btn-close"><i class="icon-remove"></i></a>
        </div>
    </div>
    <div class="box-content">
        <form class="form-horizontal" action="<?php echo url_for('lender/saveloan?id='.$loan->getId()); ?>" method="post">
        <table class="table table-bordered table-striped table-condensed">
              <thead>
                  <tr>
                      <th>属性</th>
                      <th>值</th>                         
                  </tr>
              </thead>   
              <tbody>
                <tr>
                    <td>标状态：</td>
                    <td class="center"><?php echo Loan::$status[$loan->getStatusAndChange()]; ?></td>                           
                </tr>     
                <tr>
                    <td>用户名：</td>
                    <td class="center"><?php echo $loan->getUserName(); ?></td>                           
                </tr>    
                <tr>
                    <td>借款用途：</td>
                    <td class="center">
						<select id="selectError3" name="purpose">
                            <?php foreach($loan_purposes as $purpose): ?>
								<option value="<?php echo $purpose->getId(); ?>" <?php if($loan->getPurpose()==$purpose->getId()): ?>selected = "selected"  <?php endif;?>><?php echo $purpose->getName(); ?></option>
                            <?php endforeach; ?>
                        </select>
					</td>                           
                </tr>
                <tr>
                    <td>列表类型：</td>
                    <td class="center"><?php echo $loan->getListTypeToString(); ?></td>                           
                </tr>
                <tr>
                    <td>借款标题：</td>
                    <td class="center"> <input class="input-xlarge focused" id="focusedInput" type="text" name="title" value="<?php echo $loan->getTitle(); ?>"></td>                           
                </tr>
               
                <tr>
                    <td>借款金额：</td>
                    <td class="center"><?php echo number_format($loan->getMoney(),2); ?></td>                           
                </tr>
                <tr>
                    <td>借款期限类型：</td>
                    <td class="center"><?php echo $loan->getIsDayToString(); ?></td>                           
                </tr>
                <tr>
                    <td>借款期限：</td>
                    <td class="center"><?php echo $loan->getTermNum().$loan->getIsDayToString()?></td>                           
                </tr>
                <tr>
                    <td>利率：</td>
                    <td class="center"><?php echo number_format($loan->getMoneyRate(),2); ?>%</td>                           
                </tr>
                <tr>
                    <td>截止日期：</td>
                    <td class="center"><?php echo $loan->getEndTime().'天';?></td>                           
                </tr>
                
                <tr>
                    <td>是否提现：</td>
                    <td class="center">
                        <select Class="form-control" id="sex" name="cash">
                          <option value="0" <?php if($loan->getCash()==0): ?>selected = "selected"  <?php endif;?> >否</option>
                          <option value="1" <?php if($loan->getCash()==1): ?>selected = "selected"  <?php endif;?> >是</option>
                          
                      </select>
					
					                      
                </tr>
                <tr>
                    <td>平台服务费：</td>
                    <td class="center"><input class="input-xlarge focused" id="focusedInput" type="text" name="service_fee" value="<?php echo number_format($loan->getServiceFee(),2);?>"></td>                           
                </tr>
                <?php if($loan->getListType()==2): ?>
                <tr>
                    <td>小区名称：</td>
                    <td class="center"><input class="input-xlarge focused" id="focusedInput" type="text" name="estate_name" value="<?php echo $house_infos->getEstateName();?>"></td>                           
                </tr>
                <tr>
                    <td>使用面积：</td>
                    <td class="center"><input class="input-xlarge focused" id="focusedInput" type="text" name="build_size" value="<?php echo  $house_infos->getBuildSize();?>"></td>                           
                </tr>
                <tr>
                    <td>使用年限：</td>
                    <td class="center"><input class="input-xlarge focused" id="focusedInput" type="text" name="use_year" value="<?php echo  $house_infos->getUseYear();?>"></td>                           
                </tr>
                <tr>
                    <td>评估价格：</td>
                    <td class="center"><input class="input-xlarge focused" id="focusedInput" type="text" name="evaluate_price" value="<?php echo number_format($house_infos->getEvaluatePrice(),2);?>"></td>                           
                </tr>
                <tr>
                    <td>参考价格：</td>
                    <td class="center"><input class="input-xlarge focused" id="focusedInput" type="text" name="reference_price" value="<?php echo number_format($house_infos->getReferencePrice(),2);?>"></td>                           
                </tr>
                <?php endif; ?>
                <tr>
                    <td>额度详情：</td>
                    <td class="center">
					<div class="controls">
						<textarea id="edu" name="quota_info">
							<?php echo $loan->getDescriptions()->getRaw('quota_info'); ?>
						</textarea>
					</div>
					
					</td>                           
                </tr>
                <tr>
                    <td>借款详情：</td>
                    <td class="center">
						 <div class="controls">
							<textarea id="jiekuan_info" name="loan_info">
								<?php echo $loan->getDescriptions()->getRaw('loan_info');?>
							</textarea>
						</div>
					</td>                           
                </tr>
                <tr>
                    <td>风险控制：</td>
                    <td class="center">
						<div class="controls">
							<textarea id="fengxian" name="risk_management_info">
								<?php echo $loan->getDescriptions()->getRaw('risk_management_info'); ?>
							</textarea>
						</div>
					</td>                           
                </tr>
                
              </tbody>
         </table>
        
        <div class="form-actions">
			<input type="submit" class="btn btn-primary" value="保存数据" />
			<button type="reset" class="btn" onclick="window.location.href='<?php echo url_for('lender/index'); ?>';">返回列表</button>
		</div>
        </form>
    </div>
</div>
</div>
<script type="text/javascript">
var kindedit_options = {
                    'allowFileUpload':true,
                    'width':600,
                    'height':400,
                    'allowFileManager':false,
                    'allowImageUpload':false,
                    'allowMediaUpload':false,
                    'allowFlashUpload':false,
                    'filterMode' : false,
                    'shadowMode':true,
                    'items':  [ 
                                'source', '|', 'undo', 'redo', '|', 'preview',  'about','template', 'code', 'cut', 'copy', 'paste',
                                'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                                'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                                'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
                                'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
                                'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
                                'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
                                'anchor', 'link', 'unlink'
                            ],
                    'uploadJson' : '<?php // echo url_for('file/upload') ?>',
                    'fileManagerJson' : '<?php // echo url_for('file/manage') ?>'
                     
                };
                
     var editer = KindEditor.create($('#edu,#fengxian,#jiekuan_info'),kindedit_options);
</script>